﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;

namespace libAddressBook.FORMS
{
    public partial class frmFindCompany : Telerik.WinControls.UI.RadForm
    {
        public frmFindCompany()
        {
            InitializeComponent();
        }

        private void frmFindCompany_Load(object sender, EventArgs e)
        {
            this.TopMost = true;
            setSeachCriteriaDDl();
        }

        private void setSeachCriteriaDDl()
        {
            try
            {
                if (ddlFindBy.Items.Count > 0)
                {
                    ddlFindBy.Items.Clear();
                }
                for(int intColIndex = 0; intColIndex < dgvFind.Columns.Count; intColIndex++)
                {
                    ddlFindBy.Items.Add(dgvFind.Columns[intColIndex].Name.Trim()); 
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " setSeachCriteriaDDl"); 
            }
        }   

      
    }
}
